<template>
	<view class="uni_box home">
		<!-- <navbar title=''>
		</navbar> -->
		<view class="content">
			<image class="img_bjtuan" src="/static/mine/fenbg.png"></image>
			<view class="qianview">
				<view class="jione">
					<image class="icon_back" src="/static/img/icon_back.png" @click="getfan"></image>
					<text class="htit">分站系统申请</text>
				</view>
				<view class="fentishi">
					<text class="tname">请在底部提交资料申请!</text>
					<u-parse :html="content"></u-parse>
				</view>
				<view class="jiti">
					<view class="jiitem">
						<text class="jiname">姓名</text>
						<view class="jishu">
							<u-input v-model="name" type="text" :border="false" placeholder="请输入"/>
						</view>
					</view>
					<view class="jiitem">
						<text class="jiname">联系方式</text>
						<view class="jishu">
							<u-input v-model="mobile" type="text" :border="false" placeholder="请输入"/>
						</view>
					</view>
					<view class="jiitem">
						<text class="jiname">推荐人联系方式</text>
						<view class="jishu">
							<u-input v-model="parent_mobile" type="text" :border="false" placeholder="请输入"/>
						</view>
					</view>
					<view class="jiitem">
						<text class="jiname">请输入团队情况</text>
						<view class="jishu">
							<u-input v-model="team_des" type="textarea" :border="false" placeholder="请输入"/>
						</view>
					</view>
					<view class="tjiao" @click="shenqing">提交上级</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				phone:'',
				// content:'可以留下你的具体信息情况既是为了保护团队渠道发展也鼓励市场裂坠我们会在收到信息后进入对接流程:(申请信息会以短信提醒方式发给团队上级，信息内容由上级优先处理。超过24小时内无人有效对接处理，将由平台协管)《请不要给任何人私下转款!!!》如何查看直属团队申请信息:前往个人中心-我的工具-申请列表查看',
				name:'',
				mobile:'',
				parent_mobile:'',
				team_des:'',
				content:''
			}
		},
		onLoad() {
			this.getxieyi()
		},
		onShow() {
		},
		methods: {
			getji(e){
				this.navrouter("/pages_subject/twoPage/MyTeamList?type="+e);
			},
			getfan(){
				uni.navigateBack()
			},
			
			async getxieyi(){
				let res = await this.$u.api.getContent({
					code:'fenzhan'
				});
				this.content = res.content
			},
			async shenqing(){
				  if(!this.name){
					this.$u.toast("请输入姓名");
					return false;
				  }
				  if(!this.mobile){
					this.$u.toast("请输入联系方式");
					return false;
				  }
				  if(!this.parent_mobile){
					this.$u.toast("请输入推荐人联系方式");
					return false;
				  }
				  if(!this.team_des){
					this.$u.toast("请输入团队情况");
					return false;
				  }
				let res = await this.$u.api.applySite({
					name:this.name,
					mobile:this.mobile,
					parent_mobile:this.parent_mobile,
					team_des:this.team_des
				});
				this.$u.toast("提交成功");
				setTimeout(() => {
					this.navrouter("/pages_subject/twoPage/ShengList");
				}, 1000);

			}
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #fff;
	}
	.content{
		min-height: 120vh;
		background-color: #f5f5f5;
		position: relative;
		.img_bjtuan{
			position: absolute;
			width: 100%;
			height: 100%;
		}
		.qianview{
			position: relative;
			.jione{
				position: relative;
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: center;
				padding: 30rpx 0 0 30rpx;
				// #ifdef APP-PLUS
				padding-top: calc(var(--status-bar-height) + 30rpx);
				// #endif
			}
			.icon_back{
				width: 35rpx;
				height: 35rpx;
				position: absolute;
				left: 30rpx;

			}
			.htit{
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color: #FFFFFF;
			}
			.jiview{
				margin-left: auto;
				width: 126rpx;
				height: 60rpx;
				background: rgba(0,0,0,0.2);
				border-radius: 30rpx 0rpx 0rpx 30rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				.jilu{
					width: 44rpx;
					height: 44rpx;
					margin-right: 4rpx;
				}
				.jitit{
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 24rpx;
					color: #FFFFFF;
				}
			}
		}
		.fentishi{
			padding: 40rpx;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 24rpx;
			color: #FFFFFF;
			.tname{
				display: block;
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color: #FFFFFF;
				display: block;
				margin-bottom: 20rpx;

			}
		}
		.jiti{
			padding: 40rpx 30rpx;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin: 30rpx;
			.jiitem{
				display: flex;
				flex-direction: column;
				margin-bottom: 30rpx;
				.jiname{
					font-weight: bold;
					font-size: 32rpx;
					color: #51565D;
					display: block;
					margin-bottom: 20rpx;
				}
				.jishu{
					background: #F5F5F5;
					border-radius: 20rpx;
					padding: 20rpx 30rpx;

				}
			}
			.tjiao{
				height: 78rpx;
				background: linear-gradient(-82deg, #4BB6F0, #1D8DFD);
				border-radius: 39rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				font-family: PingFang SC;
				font-weight: 500;
				font-size: 28rpx;
				margin-top: 60rpx;
				color: #FFFFFF;
			}
		}
	}
	
</style>
